<%@page import="com.core.utils.LocalizableString"%>
<%@page import="com.core.utils.GlobalConstants"%>
<%@page import="com.entities.projectitem.actionscript.ActionScriptParserProjectDescription"%>
<%@page import="com.core.ui.actionscript.ActionScriptParser"%>
<%@page import="com.entities.projectitem.list.ProjectListController"%>
<%@page import="com.core.ui.controller.ActionBarController"%>
<%@page import="com.core.ui.controller.StackNavigatorController"%>
<%@page import="com.core.utils.StackItem"%>
<%@page import="com.core.managers.SessionManager"%>
<%@taglib prefix="sorokina" uri="/WEB-INF/Sorokina.tld"%>
<script type="text/javascript">
<%
	LocalizableString localizableString = LocalizableString.sharedInstance();
	String confirm = LocalizableString.sharedInstance().localizable("tabsheet.projects.projectslist.confirm.delete");
%>
function deleteProject(projectId){
    var confirmResult = confirm("<%=confirm%>");
    if (confirmResult){

        jQuery.post('<%=GlobalConstants.SERVLET_PROJECTDELETE%>',
                {'id'        : projectId}
                ,function(data){
                    location.reload();
                }
        );

    }
}
</script>


<%

    SessionManager.addContext(GlobalConstants.USERCONTEXT_PROJECTSLIST);
    String objectId = request.getParameter("id");

    ProjectListController projectsListController = new ProjectListController();


    ActionScriptParserProjectDescription projectDescriptionActionScriptParser = new ActionScriptParserProjectDescription();
    projectDescriptionActionScriptParser.setProjectId(objectId);


    ActionBarController actionBarController = new ActionBarController();
    actionBarController.setActionScriptParser(projectDescriptionActionScriptParser);

%>


<div>

    <sorokina:ActionBarView datasource="<%=actionBarController %>" />
    <sorokina:TableView datasource="<%=projectsListController%>" delegate="<%=projectsListController%>" />
</div>